﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CRMMaster.Master" AutoEventWireup="true" CodeBehind="Documents.aspx.cs" Inherits="FinalCRM.Mary_s_Modules.Documents" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxTabControl" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxClasses" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxSplitter" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxFileManager" tagprefix="dx" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<%@ Register assembly="DevExpress.Web.ASPxScheduler.v11.1, Version=11.1.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxScheduler" tagprefix="dxwschs" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    &nbsp;<dx:ASPxPanel ID="ASPxPanel1" runat="server" Height="696px" Width="816px" >
        <PanelCollection>
<dx:PanelContent runat="server">
    <dx:ASPxPageControl ID="PgCtrlDocument" runat="server" ActiveTabIndex="1" 
        Height="90px" Width="772px" 
        OnActiveTabChanged="PgCtrlDocument_ActiveTabChanged" 
        OnLoad="PgCtrlDocument_Load">
        <TabPages>
            <dx:TabPage Name="PgCtrlCreateDoc" Text="Create Documents">
                <ContentCollection>
                    <dx:ContentControl runat="server">
                        <asp:Label ID="Label1" runat="server" Text="Overview"></asp:Label>
                        <br />
                        <br />
                        <dx:ASPxSplitter ID="SplitterCreateDoc" runat="server" Height="440px" 
                            CssFilePath="~/App_Themes/RedWine/{0}/styles.css" CssPostfix="RedWine">
                            <panes>
                                <dx:SplitterPane>
                                    <contentcollection>
                                        <dx:SplitterContentControl runat="server" SupportsDisabledAttribute="True">
                                            <br />
                                            <asp:Label ID="Label21" runat="server" Text="File Name : "></asp:Label>
                                            <br />
                                            <br />
                                            <asp:FileUpload ID="fUPFileName" runat="server" Height="28px" Width="300px" />
                                            <br />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                                                ControlToValidate="fUPFileName" ErrorMessage="Please choose a Document File!" 
                                                ForeColor="Red"></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:Label ID="Label22" runat="server" Text="Document Name : "></asp:Label>
                                            <br />
                                            <br />
                                            <asp:TextBox ID="txtBoxDocName" runat="server" Width="216px"></asp:TextBox>
                                            <br />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                                                ControlToValidate="txtBoxDocName" ErrorMessage="Please enter a Document Name!" 
                                                ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:Label ID="Label23" runat="server" Text="Document Type : "></asp:Label>
                                            <br />
                                            <br />
                                            <asp:TextBox ID="txtBoxDocType" runat="server" 
                                                OnTextChanged="txtBoxDocType_TextChanged" Width="216px"></asp:TextBox>
                                            <br />
                                            <br />
                                            <asp:Label ID="Label24" runat="server" Text="Description :"></asp:Label>
                                            <br />
                                            <br />
                                            <asp:TextBox ID="txtBoxDocDesc" runat="server" Height="100px" 
                                                TextMode="MultiLine" Width="213px"></asp:TextBox>
                                            <br />
                                            <br />
                                            <br />
                                            <br />
                                            <br />
                                            <br />
                                            <br />
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            <br />
                                        </dx:SplitterContentControl>
                                    </contentcollection>
                                </dx:SplitterPane>
                                <dx:SplitterPane>
                                    <contentcollection>
                                        <dx:SplitterContentControl runat="server" SupportsDisabledAttribute="True">
                                            <br />
                                            <asp:Label ID="Label6" runat="server" Text="Assigned by : "></asp:Label>
                                            <br />
                                            &nbsp;
                                            <br />
                                            <asp:TextBox ID="txtBoxDocAssignBy" runat="server" Width="216px" 
                                                style="margin-top: 0px"></asp:TextBox>
                                            <br />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                                ControlToValidate="txtBoxDocAssignBy" ErrorMessage="Please choose one!" 
                                                ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:Label ID="Label7" runat="server" Text="Related Customer : "></asp:Label>
                                            <br />
                                            <br />
                                            <asp:DropDownList ID="ddlDocRelatedCus" runat="server" Height="28px" 
                                                Width="138px">
                                                <asp:ListItem>Choose one......</asp:ListItem>
                                            </asp:DropDownList>
                                            <br />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                                                ControlToValidate="ddlDocRelatedCus" ErrorMessage="Please enter the Customer name!" 
                                                ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:Label ID="Label25" runat="server" Text="Date : "></asp:Label>
                                            <br />
                                            <br />
                                            <asp:TextBox ID="txtBoxDocDate" runat="server" Enabled="False" ReadOnly="True" 
                                                style="margin-top: 0px" Width="216px"></asp:TextBox>
                                            <br />
                                            <br />
                                            </asp:CalendarExtender>

                                            &nbsp;
                                            <br />
                                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<br />
                                            <br />
                                            <br />
                                            <br />
                                            <br />
                                            <br />
                                            <br />
                                            <br />
                                            <br />
                                        </dx:SplitterContentControl>
                                    </contentcollection>
                                </dx:SplitterPane>
                            </panes>
                            <Styles CssFilePath="~/App_Themes/RedWine/{0}/styles.css" CssPostfix="RedWine">
                            </Styles>
                            <Images SpriteCssFilePath="~/App_Themes/RedWine/{0}/sprite.css">
                            </Images>
                        </dx:ASPxSplitter>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Button ID="btnDocSave" runat="server" Height="35px" 
                            OnClick="btnDocSave_Click" Text="Save" Width="75px" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnDocCancel" runat="server" Height="35px" Text="Cancel" 
                            Width="77px" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </dx:ContentControl>
                </ContentCollection>
            </dx:TabPage>
            <dx:TabPage Name="PgCtrlViewDoc" Text="View Documents">
                <ContentCollection>
                    <dx:ContentControl runat="server">
                        &nbsp;&nbsp; <br />
                        <dx:ASPxButtonEdit ID="BtnEditSearchDoc" runat="server" Height="28px" 
                            Width="405px" CssFilePath="~/App_Themes/Aqua/{0}/styles.css" 
                            CssPostfix="Aqua" SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css" 
                            OnTextChanged="BtnEditSearchDoc_TextChanged">
                            <ClientSideEvents ButtonClick="function(s, e) {
	docGrid.PerformCallBack(s.GetValue());
}" />
                            <Buttons>
                                <dx:EditButton Text="Search by Document Name">
                                </dx:EditButton>
                            </Buttons>
                            <ValidationSettings>
                                <ErrorFrameStyle ImageSpacing="4px">
                                    <ErrorTextPaddings PaddingLeft="4px" />
                                </ErrorFrameStyle>
                            </ValidationSettings>
                        </dx:ASPxButtonEdit>
                        <br />
                        <dx:ASPxGridView ID="GVDocView" runat="server" ClientInstanceName="docGrid" 
                            CssFilePath="~/App_Themes/Glass/{0}/styles.css" 
                            CssPostfix="Glass" DataSourceID="DocumentODS" 
                            OnCustomCallback="GVDocView_CustomCallback" 
                            OnRowCommand="GVDocView_RowCommand">
                            <Settings ShowFilterRow="True" />
                            <Images SpriteCssFilePath="~/App_Themes/Glass/{0}/sprite.css">
                                <LoadingPanelOnStatusBar Url="~/App_Themes/Glass/GridView/gvLoadingOnStatusBar.gif">
                                </LoadingPanelOnStatusBar>
                                <LoadingPanel Url="~/App_Themes/Glass/GridView/Loading.gif">
                                </LoadingPanel>
                            </Images>
                            <ImagesFilterControl>
                                <LoadingPanel Url="~/App_Themes/Glass/Editors/Loading.gif">
                                </LoadingPanel>
                            </ImagesFilterControl>
                            <Styles CssFilePath="~/App_Themes/Glass/{0}/styles.css" 
                                CssPostfix="Glass">
                                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                </Header>
                            </Styles>
                            <StylesEditors>
                                <CalendarHeader Spacing="1px">
                                </CalendarHeader>
                                <ProgressBar Height="25px">
                                </ProgressBar>
                            </StylesEditors>
                        </dx:ASPxGridView>
                        <br />
                        <asp:ObjectDataSource ID="DocumentODS" runat="server" 
                            DataObjectTypeName="FinalCRM.Mary_s_Modules.DocumentObj" 
                            DeleteMethod="DeleteDoc" InsertMethod="CreateDoc" SelectMethod="ViewDoc" 
                            TypeName="FinalCRM.Mary_s_Modules.DocumentObj" UpdateMethod="UpdateDoc">
                        </asp:ObjectDataSource>
                        <br />
                        <br />
                        <dx:ASPxPanel ID="PnlInView" runat="server" Height="223px" Width="382px">
                            <PanelCollection>
                                <dx:PanelContent runat="server">
&nbsp;<br /> <asp:Label ID="Label13" runat="server" Text="File Name : "></asp:Label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:FileUpload ID="fUPViewFileName" runat="server" Height="28px" 
                                        Width="224px" />
                                    <br />
                                    <br />
                                    <asp:Label ID="Label15" runat="server" Text="Document Name : "></asp:Label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="txtBoxUpDocName" runat="server" Width="216px"></asp:TextBox>
                                    <br />
                                    <br />
                                    <asp:Label ID="Label20" runat="server" Text="Document Type : "></asp:Label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:TextBox ID="txtBoxUpDocType" runat="server" Width="216px"></asp:TextBox>
                                    <br />
                                    <br />
                                    <asp:Label ID="Label18" runat="server" Text="Description :"></asp:Label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:TextBox ID="txtBoxUpDocDes" runat="server" Width="216px"></asp:TextBox>
                                    <br />
                                    <br />
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnUpDoc" runat="server" Text="Update" />
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:Button ID="btnDeleteDoc" runat="server" Text="Delete" />
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:Button ID="btnEmail" runat="server" Text="Email" />
                                    <br />
                                    <br />
                                    <br />
                                </dx:PanelContent>
                            </PanelCollection>
                        </dx:ASPxPanel>
                    </dx:ContentControl>
                </ContentCollection>
            </dx:TabPage>
        </TabPages>
    </dx:ASPxPageControl>
            </dx:PanelContent>
</PanelCollection>
    </dx:ASPxPanel>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
</asp:Content>
